
@extends('common.layout')

@section('title', '管理员管理')

@section('body')
    <body class="pear-container">
        <div class="layui-card">
            <div class="layui-card-body">
                <form class="layui-form">
                    <div class="layui-form-item">
                        <div class="layui-form-item layui-inline">
                            <label class="layui-form-label">用户名</label>
                            <div class="layui-input-inline">
                                <input type="text" name="nickname" placeholder="" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item layui-inline">
                            <label class="layui-form-label">邮箱</label>
                            <div class="layui-input-inline">
                                <input type="text" name="email" placeholder="" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item layui-inline">
                            <button class="pear-btn pear-btn-md pear-btn-primary" lay-submit lay-filter="search">
                                <i class="layui-icon layui-icon-search"></i>
                                查询
                            </button>
                            <button type="reset" class="pear-btn pear-btn-md search-reset">
                                <i class="layui-icon layui-icon-refresh"></i>
                                重置
                            </button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <div class="layui-card">
            <div class="layui-card-body">
                <table id="table" lay-filter="table"></table>
            </div>
        </div>

        <script type="text/html" id="toolbar">

            @if (admin_can('/admin/admin/add'))
            <button class="pear-btn pear-btn-primary pear-btn-md" lay-event="add" data-url="/admin/admin/show">
                <i class="layui-icon layui-icon-add-1"></i>
                新增
            </button>
            @endif

            @if (admin_can('/admin/admin/del'))
            <button class="pear-btn pear-btn-danger pear-btn-md" lay-event="batchRemove" data-url="/admin/admin/del">
                <i class="layui-icon layui-icon-delete"></i>
                删除
            </button>
            @endif
        </script>

        <script type="text/html" id="bar">
            @if (admin_can('/admin/admin/edit'))
            <button class="pear-btn pear-btn-primary pear-btn-sm" data-url="/admin/admin/show" lay-event="edit"><i class="layui-icon layui-icon-edit"></i></button>
            @endif

            @if (admin_can('/admin/admin/del'))
            <button class="pear-btn pear-btn-danger pear-btn-sm" data-url="/admin/admin/del" lay-event="remove"><i class="layui-icon layui-icon-delete"></i></button>
            @endif

            @if (admin_can('/admin/admin/sendmsg'))
            <button class="pear-btn pear-btn-success pear-btn-sm" lay-event="sendmsg"><i class="layui-icon layui-icon-release"></i></button>
            @endif
        </script>

        <script type="text/html" id="avatar">
            <img class="layui-nav-img" src="@{{ d.avatar }}" alt="">
        </script>

        <script type="text/html" id="status">
            @{{#if (d.status == 'normal') { }}
            <span>正常</span>
            @{{# }else if(d.status == 'disibled'){ }}
            <span>禁用</span>
            @{{# }else{ }}
            <span>未知</span>
            @{{# } }}
        </script>

        @parent
    </body>
@endsection
